Property Expressions Exercise 9
Exercise 9: Expression Events (Time Windows)
Objective
To trigger events with an expression using time windows
Summary
Using time window expression, set up $PROPERTY:SET events to set the value of a property called SHIFT with the correct shift number.
- If between
22:00and06:00, Update the Global Property to1. - If between
06:00and14:00, Update the Global Property to2. - If between
14:00and22:00, Update the Global Property to3.
Instructions
Create the Property
- Create a Global Property called
Shiftwith a value ofNULL
Create the Schedule
- Create a Schedule named Expression Events.
Create the Job
- Create a NULL Job with following specs:
- Job Name:
Shift - Frequency: Mon-Fri-O
- Event 1 Specs:
- Event Trigger: Job Completion Complex Expression
- Expression:
(ToInt([[$TIMEhh]]) > 22 && ToInt([[$TIMEhh]]) < 24) || (ToInt([[$TIMEhh]]) > 00 && ToInt([[$TIMEhh]]) < 06) - Event: $PROPERTY:SET,Shift,1
- Event 2 Specs:
- Event Trigger: Job Completion Complex Expression
- Expression:
ToInt([[$TIMEhh]]) > 06 && ToInt([[$TIMEhh]]) < 14 - Event: $PROPERTY:SET,Shift,2
- Event 3 Specs:
- Event Trigger: Job Completion Complex Expression
- Expression:
ToInt([[$TIMEhh]]) > 14 && ToInt([[$TIMEhh]]) < 22 - Event: $PROPERTY:SET,Shift,3
Build the Schedule
- Build the Schedule and run the job
note
- Verify that the Global Property was updated to the proper Shift number
- by viewing the Global Property

- by viewing the SAM Log
Receiving Event $PROPERTY:SET,Shift,3. Received from 4/22/2025:Multi Instance job Limitations:Shifts (Job Termination Expression)
Processing Event $PROPERTY:SET,Shift,3,smatraining\smauser. Received from 4/22/2025:Multi Instance job Limitations:Shifts (Job Termination Expression)
Property [Shift] Changed to [3] by smatraining\smauser